﻿<phone:PhoneApplicationPage
    x:Class="NiklasKarl.WarpCam.Pages.CapturePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <shell:SystemTray.ProgressIndicator>
        <shell:ProgressIndicator IsIndeterminate="True" IsVisible="False"/>
    </shell:SystemTray.ProgressIndicator>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <DrawingSurfaceBackgroundGrid x:Name="LayoutRoot"
                                  Loaded="LayoutRoot_Loaded">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="128"/>
            </Grid.RowDefinitions>

            <Border Grid.Row="1" Background="{StaticResource AppAccentBrush2}" Padding="12">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Grid Grid.Column="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <Button x:Name="CaptureButton" Width="76" Height="76"
                                Style="{StaticResource AppImageButtonStyle}"
                                toolkit:TiltEffect.IsTiltEnabled="True"
                                Click="CaptureButton_Click">
                            <Image Source="/Assets/AppBar/feature.camerashutter.png"/>
                        </Button>

                        <TextBlock Grid.Row="1" Text="Capture" HorizontalAlignment="Center" Style="{StaticResource PhoneTextSubtleStyle}" Margin="6,0"/>
                    </Grid>

                    <Grid Grid.Column="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <Button x:Name="SwitchButton" Width="48" Height="48"
                                Style="{StaticResource AppImageButtonStyle}"
                                toolkit:TiltEffect.IsTiltEnabled="True"
                                Click="SwitchCamera_Click">
                            <Image Source="/Assets/AppBar/feature.frontcamera.png"/>
                        </Button>

                        <TextBlock Grid.Row="1" Text="Switch" HorizontalAlignment="Center" Style="{StaticResource PhoneTextSubtleStyle}" Margin="6,0"/>
                    </Grid>
                </Grid>
            </Border>
        </Grid>
    </DrawingSurfaceBackgroundGrid>

</phone:PhoneApplicationPage>